package com.supermarket.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.supermarket.dao.ProviderDao;
import com.supermarket.model.Provider;
import com.supermarket.service.IProviderFunction;
@Service
public class ProviderFunctionImpl implements IProviderFunction{

	ProviderDao pDao;
	
	public ProviderDao getpDao() {
		return pDao;
	}

	@Autowired
	public void setpDao(ProviderDao pDao) {
		this.pDao = pDao;
	}

	public List<Provider> selectProviderBypagination() {
		List<Provider>  list= pDao.selectProviderByPagination();
		return list;
	}

	public void deleteById(Integer id) {
		pDao.deleteById(id);
	}

	public void addProvider(Provider provider) {
		pDao.addProvider(provider);
		
	}

	public List<Provider> queryProvider(String keyword) {
		// TODO Auto-generated method stub
		return pDao.queryProvider(keyword);
	}

}
